#pragma once
#ifndef VImageViewerMainWindow_H
#define VImageViewerMainWindow_H

#include "VImageViewerWidget.h"
//#include "downloadFiles.h"


//void getFromRomanManager(QString, QString fileName,  int numberThreads, QString filter = "");
//static void loadFromURL(QUrl url, QString curFilter = "", BOOLEAN noMessage = true);



class VImageViewerMainWindow : public QMainWindow
{
	Q_OBJECT

public:
	VImageViewerMainWindow(QWidget *parent = 0, Qt::WFlags flags = 0);
	~VImageViewerMainWindow();
	void onTRYDOWNLOADFILESFAST(QStringList files);
	void onTRYDOWNLOADFILESFASTFromFileVREF(QString fileName);
	//void onTRYADDFILESFAST(QStringList files);
	bool isWidgetShown;
protected:
	bool firstLoading;
	QString * curFilter;
	void setupChildProcess();
	bool winEvent		( MSG * message, long * result );
	void closeEvent(QCloseEvent * event);
	void mouseMoveEvent	(QMouseEvent * event);
	QLabel * label;
	public slots:
		void loading( int curNumberOfFile, int numberOfAllFiles, QString curFileName, unsigned int currentByte, unsigned int total, unsigned int currentByteAll, unsigned int totalAll);
		void downloading(int time, int numberFile, int size, int done, bool isSavingFilesToDisk);
	
private:
	VImageViewerWidget *imageViewer;
	
};



#endif // VImageViewerMainWindow_H
